package com.witsight.hibernate.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.witsight.hibernate.dao.UserRepository;
import com.witsight.hibernate.model.User;
import com.witsight.hibernate.service.UserService;
import com.witsight.platform.exception.BusinessException;

/**   
 * 说明：[]
 * @Title: UserServiceImpl.java 
 * @Package com.witsight.hibernate.service.impl 
 * @See: []
 * Copyright: Copyright (c) 2017
 * Company:sany huax witsight team by product
 * @author: fuyp  
 * @date: 2017年9月19日 上午11:49:42 
 * @version: V1.0
 *
 */
@Service
public class UserServiceImpl extends JpaBaseGenericServiceImpl<User,String> implements UserService{
	@Autowired
	protected UserServiceImpl(UserRepository baseDao) {
		super(baseDao);
	}
	
	
	public boolean saveUser() throws BusinessException{
		User user = new User();
		user.setUsername("aaaa");
		user.setAge(11);
		this.getBaseDao().save(user);
		return true;
	}
}
